/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package estg.dae.projecto.bank.model;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 *
 * @author Marco
 */
@Entity
@Table(name="Cards", uniqueConstraints={
    @UniqueConstraint(columnNames="number")})
public class Card implements Serializable {
    @Id
    private long id;
    @ManyToOne
    private Client client;
    private String number;
    @ManyToOne
    private Account account;
    private double maxDailyLimit;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public Client getClient() {
        return client;
    }

    public void setClient(Client client) {
        this.client = client;
    }

    public Account getAccount() {
        return account;
    }

    public void setAccount(Account account) {
        this.account = account;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public double getMaxDailyLimit() {
        return maxDailyLimit;
    }

    public void setMaxDailyLimit(double maxDailyLimit) {
        this.maxDailyLimit = maxDailyLimit;
    }
    
}
